#!/usr/bin/env python
# -*- coding:utf-8 -*-
# 项目名称:django_vue
# 文件名 :app.py
# @Time :2024/4/25 18:02
# @Author :wangyong
'''
简介:

'''
from flask import Flask,render_template,request

app=Flask(__name__)

@app.route('/index',methods=['GET','POST'])
def index():
    if request.method=='GET':
        return render_template('index.html')
    else:
        print(request.form)
        user = request.form.get('user')
        pwd = request.form.getlist('pwd')
        aihao = request.form.getlist('爱好')

        return "注册成功,user={},pwd={},爱好={}".format(user, pwd, aihao)

# @app.route('/do/reg',methods=['GET'])
# def do_register():
#     print(request.args)
#     return "注册成功"

@app.route('/login',methods=['GET'])
def login():
    return render_template('login.html')

@app.route('/register',methods=['GET'])
def register():
    return render_template('register.html')


if __name__=='__main__':
    app.run()
